'use strict';
const express = require('express');
const router = express();
const api = require('../controller/api');
/* 验证码 */
//router.post('/verifyCode', api.verifycode.getVerifycode);
//router.post('/verifyCode/check', api.verifycode.checkVerifycode);

/* 注册 */
router.post('/auth/reg/check', api.register.checkPhone);
router.post('/auth/reg', [api.register.requireVerifyCodeExits], api.register.reg);
/*登录*/
router.post('/login', api.login.login);//登录请求

/*博客相关*/
router.get('/getAboutUs', api.aboutUs.aboutUs1, api.aboutUs.aboutUs2, api.aboutUs.aboutUs);//关于我
router.get('/getBlogArticle', api.userBlogArticle.userBlogAllArticle);//获取博客文章
router.post('/uploadBlogArticle', api.userBlogArticle.uploadBlogArticle);//添加博客文章
router.all('/*', api.userToken.checkToken);//他以后的所有的请求都需要先执行它

router.get('/getProduction', api.Production.userAllProduction);//作品

module.exports = router;